{"ast":null,"code":"import * as React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport var DEFAULT_MODE_STORAGE_KEY = 'mode';\nexport var DEFAULT_COLOR_SCHEME_STORAGE_KEY = 'color-scheme';\nexport var DEFAULT_ATTRIBUTE = 'data-color-scheme';\nexport default function getInitColorSchemeScript(options) {\n  var _ref = options || {},\n    _ref$defaultMode = _ref.defaultMode,\n    defaultMode = _ref$defaultMode === void 0 ? 'light' : _ref$defaultMode,\n    _ref$defaultLightColo = _ref.defaultLightColorScheme,\n    defaultLightColorScheme = _ref$defaultLightColo === void 0 ? 'light' : _ref$defaultLightColo,\n    _ref$defaultDarkColor = _ref.defaultDarkColorScheme,\n    defaultDarkColorScheme = _ref$defaultDarkColor === void 0 ? 'dark' : _ref$defaultDarkColor,\n    _ref$modeStorageKey = _ref.modeStorageKey,\n    modeStorageKey = _ref$modeStorageKey === void 0 ? DEFAULT_MODE_STORAGE_KEY : _ref$modeStorageKey,\n    _ref$colorSchemeStora = _ref.colorSchemeStorageKey,\n    colorSchemeStorageKey = _ref$colorSchemeStora === void 0 ? DEFAULT_COLOR_SCHEME_STORAGE_KEY : _ref$colorSchemeStora,\n    _ref$attribute = _ref.attribute,\n    attribute = _ref$attribute === void 0 ? DEFAULT_ATTRIBUTE : _ref$attribute,\n    _ref$colorSchemeNode = _ref.colorSchemeNode,\n    colorSchemeNode = _ref$colorSchemeNode === void 0 ? 'document.documentElement' : _ref$colorSchemeNode;\n  return /*#__PURE__*/_jsx(\"script\", {\n    // eslint-disable-next-line react/no-danger\n    dangerouslySetInnerHTML: {\n      __html: \"(function() { try {\\n        var mode = localStorage.getItem('\".concat(modeStorageKey, \"') || '\").concat(defaultMode, \"';\\n        var cssColorScheme = mode;\\n        var colorScheme = '';\\n        if (mode === 'system') {\\n          // handle system mode\\n          var mql = window.matchMedia('(prefers-color-scheme: dark)');\\n          if (mql.matches) {\\n            cssColorScheme = 'dark';\\n            colorScheme = localStorage.getItem('\").concat(colorSchemeStorageKey, \"-dark') || '\").concat(defaultDarkColorScheme, \"';\\n          } else {\\n            cssColorScheme = 'light';\\n            colorScheme = localStorage.getItem('\").concat(colorSchemeStorageKey, \"-light') || '\").concat(defaultLightColorScheme, \"';\\n          }\\n        }\\n        if (mode === 'light') {\\n          colorScheme = localStorage.getItem('\").concat(colorSchemeStorageKey, \"-light') || '\").concat(defaultLightColorScheme, \"';\\n        }\\n        if (mode === 'dark') {\\n          colorScheme = localStorage.getItem('\").concat(colorSchemeStorageKey, \"-dark') || '\").concat(defaultDarkColorScheme, \"';\\n        }\\n        if (colorScheme) {\\n          \").concat(colorSchemeNode, \".setAttribute('\").concat(attribute, \"', colorScheme);\\n        }\\n      } catch (e) {} })();\")\n    }\n  }, \"mui-color-scheme-init\");\n}","map":{"version":3,"names":["React","jsx","_jsx","DEFAULT_MODE_STORAGE_KEY","DEFAULT_COLOR_SCHEME_STORAGE_KEY","DEFAULT_ATTRIBUTE","getInitColorSchemeScript","options","defaultMode","defaultLightColorScheme","defaultDarkColorScheme","modeStorageKey","colorSchemeStorageKey","attribute","colorSchemeNode","dangerouslySetInnerHTML","__html"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@mui/system/esm/cssVars/getInitColorSchemeScript.js"],"sourcesContent":["import * as React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const DEFAULT_MODE_STORAGE_KEY = 'mode';\nexport const DEFAULT_COLOR_SCHEME_STORAGE_KEY = 'color-scheme';\nexport const DEFAULT_ATTRIBUTE = 'data-color-scheme';\nexport default function getInitColorSchemeScript(options) {\n  const {\n    defaultMode = 'light',\n    defaultLightColorScheme = 'light',\n    defaultDarkColorScheme = 'dark',\n    modeStorageKey = DEFAULT_MODE_STORAGE_KEY,\n    colorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY,\n    attribute = DEFAULT_ATTRIBUTE,\n    colorSchemeNode = 'document.documentElement'\n  } = options || {};\n  return /*#__PURE__*/_jsx(\"script\", {\n    // eslint-disable-next-line react/no-danger\n    dangerouslySetInnerHTML: {\n      __html: `(function() { try {\n        var mode = localStorage.getItem('${modeStorageKey}') || '${defaultMode}';\n        var cssColorScheme = mode;\n        var colorScheme = '';\n        if (mode === 'system') {\n          // handle system mode\n          var mql = window.matchMedia('(prefers-color-scheme: dark)');\n          if (mql.matches) {\n            cssColorScheme = 'dark';\n            colorScheme = localStorage.getItem('${colorSchemeStorageKey}-dark') || '${defaultDarkColorScheme}';\n          } else {\n            cssColorScheme = 'light';\n            colorScheme = localStorage.getItem('${colorSchemeStorageKey}-light') || '${defaultLightColorScheme}';\n          }\n        }\n        if (mode === 'light') {\n          colorScheme = localStorage.getItem('${colorSchemeStorageKey}-light') || '${defaultLightColorScheme}';\n        }\n        if (mode === 'dark') {\n          colorScheme = localStorage.getItem('${colorSchemeStorageKey}-dark') || '${defaultDarkColorScheme}';\n        }\n        if (colorScheme) {\n          ${colorSchemeNode}.setAttribute('${attribute}', colorScheme);\n        }\n      } catch (e) {} })();`\n    }\n  }, \"mui-color-scheme-init\");\n}"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,GAAG,IAAIC,IAAI,QAAQ,mBAAmB;AAC/C,OAAO,IAAMC,wBAAwB,GAAG,MAAM;AAC9C,OAAO,IAAMC,gCAAgC,GAAG,cAAc;AAC9D,OAAO,IAAMC,iBAAiB,GAAG,mBAAmB;AACpD,eAAe,SAASC,wBAAwB,CAACC,OAAO,EAAE;EACxD,WAQIA,OAAO,IAAI,CAAC,CAAC;IAAA,wBAPfC,WAAW;IAAXA,WAAW,iCAAG,OAAO;IAAA,6BACrBC,uBAAuB;IAAvBA,uBAAuB,sCAAG,OAAO;IAAA,6BACjCC,sBAAsB;IAAtBA,sBAAsB,sCAAG,MAAM;IAAA,2BAC/BC,cAAc;IAAdA,cAAc,oCAAGR,wBAAwB;IAAA,6BACzCS,qBAAqB;IAArBA,qBAAqB,sCAAGR,gCAAgC;IAAA,sBACxDS,SAAS;IAATA,SAAS,+BAAGR,iBAAiB;IAAA,4BAC7BS,eAAe;IAAfA,eAAe,qCAAG,0BAA0B;EAE9C,OAAO,aAAaZ,IAAI,CAAC,QAAQ,EAAE;IACjC;IACAa,uBAAuB,EAAE;MACvBC,MAAM,0EAC+BL,cAAc,oBAAUH,WAAW,mVAQ5BI,qBAAqB,yBAAeF,sBAAsB,4HAG1DE,qBAAqB,0BAAgBH,uBAAuB,wHAI9DG,qBAAqB,0BAAgBH,uBAAuB,0GAG5DG,qBAAqB,yBAAeF,sBAAsB,kEAG9FI,eAAe,4BAAkBD,SAAS;IAGlD;EACF,CAAC,EAAE,uBAAuB,CAAC;AAC7B"},"metadata":{},"sourceType":"module"}